import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router';
import CManageRoutes from './company/manage.ts';
import CDisplayRoutes from './company/display.ts';
import PManageRoutes from './project/manage.ts';
import PDisplayRoutes from './project/display.ts';
const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    redirect: '/login',
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('@T2/views/login/index.vue'),
    meta: {
      title: '登录',
    },
  },
  {
    path: '/C/Manage',
    name: 'CManage',
    component: () => import('@T2/views/Company/Manage/index.vue'),
    children: CManageRoutes,
  },
  {
    path: '/C/Display',
    name: 'CDisplay',
    component: () => import('@T2/views/Company/Display/index.vue'),
    children: CDisplayRoutes,
  },
  {
    path: '/P/Manage',
    name: 'PManage',
    component: () => import('@T2/views/Project/Manage/index.vue'),
    children: PManageRoutes,
  },
  {
    path: '/P/Display',
    name: 'PDisplay',
    component: () => import('@T2/views/Project/Display/index.vue'),
    children: PDisplayRoutes,
  },
];

const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;
